// src\main.js
import { createApp } from "vue";
// import "./style.css";
// 引入公共的样式
// import "./assets/style/index.scss";
// import "./assets/style/reset.css";
import App from "./App.vue";
// 导入路由
import router from "./router";
// 导入element-plush
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
// 引入axios
import request from "./utils/request.js";
// 引入封装的storage
import storage from "./utils/storage";
// 引入封装的store
import store from "./store";

import * as ElementPlusIconVue from "@element-plus/icons-vue";
// 使用路由, 使用element-plus
const app = createApp(App);

for (const [key, component] of Object.entries(ElementPlusIconVue)) {
	// 注册全局组件
	app.component(key, component);
}

// 全局挂载变量
app.config.globalProperties.$request = request;
app.config.globalProperties.$storage = storage;
app.use(router);
app.use(store);
app.use(ElementPlus, { size: "small" });
app.mount("#app");
